﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using StructureMap.Configuration.DSL;
using Universum.Model.Services;
using System.Security.Principal;
using Universum.Model.Services.Indexing;
using Universum.Model.Services.Personals;
using Universum.Infrastructure.Utils;

namespace Universum.Infrastructure.Configuration
{
	public class ServicesRegistry : Registry
	{
		public ServicesRegistry()
		{
			FillAllPropertiesOfType<IPrincipal>().TheDefault.Is.Instance(
				new PrincipalInstance());
			
			ForRequestedType<IFileService>()
				.TheDefaultIsConcreteType<FileService>()
				
				;
			
			ForRequestedType<IFriendlyUrlService>().TheDefaultIsConcreteType<FriendlyUrlServiceImpl>();
			
			ForRequestedType<IPersonalService>()
				.TheDefaultIsConcreteType<PersonalServiceImpl>();
			ForRequestedType<IPathConfigurationService>()
				.TheDefaultIsConcreteType<PathConfigurationService>();
			ForRequestedType<IRssService>()
				.TheDefaultIsConcreteType<RssServiceImpl>();
		}
	}
}
